import request from '@/api/utils/request'
import { defaultPage, doLogin } from '@/constant/url'
import { response } from 'express'

// 使用拦截器发送http请求
export const sendHttpPost = (url: any, data:any) =>
  // request.post(url, { params: data }).then((response) => {
  //   return response
  // })
  request({
    url: url,
    method: 'post',
    data: data
  }).then((response) => {
    return response
  })

export const forwardRequestSend = (data: any) =>
  request({
    // url: defaultPage,
    url: doLogin,
    method: 'post',
    data
  }).then((response) => {
    return response
  })
